using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using InterfaceAPI;

public class UserGUI : MonoBehaviour
{
    public IUserAction action;
    public int remake_flag=0;
    GUISkin myskin ;
    void Start() {
        myskin = Resources.Load<GUISkin>("GUIskin/other_skin");
        action = TheDirector.getInstance().CurrentSceneController as IUserAction;
    }
    void OnGUI() {
        GUI.skin = myskin;
        if (GUI.Button(new Rect(Screen.width/2-100,10,200,70),"重新开始")) {
            action.remake();
            remake_flag = 0;
        }        
        if(remake_flag==-1) 
            GUI.Label(new Rect(Screen.width/2-100,Screen.height/2-100,200,100),"牧师被害\n游戏结束");  
        if(remake_flag==1) 
            GUI.Label(new Rect(Screen.width/2-100,Screen.height/2-100,200,100),"渡河成功\n你胜利了");
    }
}